
package dao.util;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author felipe
 */
public class Conexao {

    private static String DBUSUARIO = "root";
    private static String DBSENHA   = "root";
    private static String DBNOME    = "servicedesk";
 
    private Conexao(){
  
    }

    public static Connection getInstance() throws Exception {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            return DriverManager.getConnection("jdbc:mysql://localhost/"+DBNOME, DBUSUARIO, DBSENHA);
        } catch (ClassNotFoundException e) {
            throw new Exception(e.getMessage());
        }
    }
}
